package com.weblog.weblog.web.service.impl;

import com.weblog.weblog.common.domain.dos.BlogSettingsDO;
import com.weblog.weblog.common.domain.mapper.BlogSettingsMapper;
import com.weblog.weblog.common.utils.Response;
import com.weblog.weblog.web.convert.BlogSettingsConvert;
import com.weblog.weblog.web.model.vo.blogsettings.FindBlogSettingDetailRspVO;
import com.weblog.weblog.web.service.BlogSettingsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author gc
 * @date 2023年10月23日 16:31
 */

@Service
@Slf4j
public class BlogSettingsServiceImpl implements BlogSettingsService {

    @Autowired
    private BlogSettingsMapper blogSettingsMapper;

    /*
     * 获取博客设置信息
     * @author gc
     * @date 2023/10/23 16:39
     * @return com.weblog.weblog.common.utils.Response
     */
    @Override
    public Response findDetail() {
        //查询设置信息
        BlogSettingsDO blogSettingsDO = blogSettingsMapper.selectById(1L);
        FindBlogSettingDetailRspVO vo = BlogSettingsConvert.INSTANCE.convertDO2VO(blogSettingsDO);


        return Response.success(vo);
    }
}
